<!--
 * @Author: HeAo
 * @Date: 2021-11-03 15:45:29
 * @LastEditTime: 2021-11-03 15:57:16
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \web2103-2105\web2105\4-1-Nodejs\day04\app02\public\webui.html
 * 别乱动！
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.14/vue.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.js"></script>
</head>

<body>
  <div id="app">
    <button @click="findAllUsers">查询</button>
    {{user}}
  </div>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        user: []
      },
      methods: {
        findAllUsers() {
          axios.get('http://localhost:3000/user/findAll').then(res => {
            this.user = res.data.data
          })
        }
      }
    })
  </script>
</body>

</html>